<!DOCTYPE html>
<html class="x-admin-sm">
<head>
<meta charset="UTF-8">
<title></title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,height=device-height,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="__ADMIN__/css/font.css">
<link rel="stylesheet" href="__ADMIN__/css/xadmin.css">
<script type="text/javascript" src="__ADMIN__/js/jquery.min.js"></script>
<script type="text/javascript" src="__ADMIN__/lib/layui/layui.js?t=1.1" charset="utf-8"></script>
<script type="text/javascript" src="__ADMIN__/js/xadmin.js"></script>
<script type="text/javascript" src="__ADMIN__/js/cookie.js"></script>
<link rel="stylesheet" href="/static/admin/css/font.css">
<link rel="stylesheet" href="/static/admin/css/font-awesome.min.css">
<style>
.layui-form-item .layui-form-label{
    width: 120px;
}
.layui-form-item .layui-textarea{
    width: 190px;
}
#phone-one-div {display: none}
.required{background:#F6CECE !important}
.unrequired{background:#eee}
#page-2{display:none}
.client_fee_1, .client_fee_2, .client_fee_3, .client_fee_4, .client_fee_5, .fee_1, .fee_2, .fee_3, .fee_4, .fee_5{display:none}
body{background:url(/static/admin/images/dontscreenshot.png) #fff}
.show{display:block}
</style>
</head>
  
  <body>
    <div class="x-body">
        <form class="layui-form layui-form-pane">
            <div style="font-size:16px;">业务员：{$data.admin_name?:session('uname','','admin')} </div>
            <input type="hidden" id="id" name="id">

            
            <div id="page-1">
            <!--<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">-->
            <!--    <legend>活动信息</legend>-->
            <!--</fieldset>-->
            <!--<div class="layui-form-item">-->
            <!--  <label for="client_id" class="layui-form-label required">-->
            <!--      <span class="x-red">*</span>选择活动-->
            <!--  </label>-->
            <!--  <div class="layui-input-inline">-->
            <!--        <select name="client_id" id="client_id" lay-search lay-verify="required" required  {if condition="$data.client_id"}disabled{/if}>-->
            <!--            <option value="">请选择</option>-->
            <!--            {volist name="clientList" id="value"}-->
            <!--            <option value="{$value.id}" {if condition="$value.id == $data.client_id"}selected{/if}>{$value.id}-{$value.activity}</option>-->
            <!--            {/volist}-->
            <!--        </select>-->
            <!--  </div>-->
            <!--    <label for="live_id" class="layui-form-label required">-->
            <!--        <span class="x-red">*</span>直播平台ID-->
            <!--    </label>-->
            <!--    <div class="layui-input-inline">-->
            <!--        <input type="number" value="" placeholder="请先填入海豚直播ID" {if condition="$data.live_id"}readonly{/if}  name="live_id" id="live_id" lay-verify="required" autocomplete="off" class="layui-input">-->
            <!--    </div>-->
            <!--</div>-->
            
            <div class="layui-form-item">
                <input type="hidden" value="{$data.admin_name?:session('uname','','admin')}" id="admin_name" name="admin_name" lay-verify="required" readonly autocomplete="off" class="layui-input">
                <!--<label for="activity" class="layui-form-label">-->
                <!--    业务员-->
                <!--</label>-->
                <!--<div class="layui-input-inline">-->
                <!--    <input type="hidden" value="{$data.admin_name?:session('uname','','admin')}" id="admin_name" name="admin_name" lay-verify="required" readonly autocomplete="off" class="layui-input">-->
                <!--</div>-->
                <!--<label for="client_id" class="layui-form-label">-->
                <!--    选择活动-->
                <!--</label>-->
                <!--<div class="layui-input-inline">-->
                <!--    <select name="client_id"  id="client_id" lay-verify="required" lay-search="">-->
                <!--        <option value="">选择你签单的活动</option>-->
                <!--        {volist name="clientList" id="value"}-->
                <!--        <option value="{$value.id}">{$value.id}-{$value.activity}</option>-->
                <!--        {/volist}-->
                <!--    </select>-->
                <!--</div>-->


            </div>
            <div class="layui-form-item" id="area-picker">
                <!--<div class="layui-form-label">活动地区</div>-->
                <!--<div class="layui-input-inline" style="width: 200px;">-->
                <!--    <select name="province" class="province-selector" lay-search data-value="{$data.province}" lay-filter="province-1">-->
                <!--        <option value="">请选择省</option>-->
                <!--    </select>-->
                <!--</div>-->
                <!--<div class="layui-input-inline" style="width: 200px;">-->
                <!--    <select name="city" class="city-selector" lay-search data-value="{$data.city}" lay-filter="city-1">-->
                <!--        <option value="">请选择市</option>-->
                <!--    </select>-->
                <!--</div>-->
                <!--<div class="layui-input-inline" style="width: 200px; display:none">-->
                <!--    <select name="county" class="county-selector" data-value="" lay-filter="county-1">-->
                <!--        <option value="">请选择区</option>-->
                <!--    </select>-->
                <!--</div>-->
                <label for="title" class="layui-form-label">
                    活动名称
                </label>
                <div class="layui-input-inline" style="width:300px">
                    <input type="text" value="" placeholder="活动名称" name="title" id="title" lay-verify="required" autocomplete="off" class="layui-input unrequired">
                </div>
                <label for="" class="layui-form-label">
                    投票时间
                </label>
                <div class="layui-input-inline">
                    <input type="text" value="" readonly placeholder="开始时间" name="start_date" id="start_date" lay-verify="required" autocomplete="off" class="layui-input" style="background:#eee">
                </div>
                <div class="layui-input-inline">
                    <input type="text" value="" readonly placeholder="结束时间" name="end_date" id="end_date" lay-verify="required" autocomplete="off" class="layui-input" style="background:#eee">
                </div>
            </div>
            <div class="layui-form-item">
                <label for="client_ratio" class="layui-form-label required">
                    客户比例(%)
                </label>
                <div class="layui-input-inline">
                    <input type="number" value="" placeholder="单位：%" name="client_ratio" id="client_ratio" lay-verify="required" autocomplete="off" class="layui-input " >
                </div>
                <label for="salesman_radio" class="layui-form-label">
                    业务员比例(%)
                </label>
                <div class="layui-input-inline">
                    <input type="text" value="" placeholder="单位：%" readonly name="salesman_radio" id="salesman_radio" lay-verify="required" autocomplete="off" class="layui-input" style="background:#eee">
                </div>
                {if !$data.salesman_radio}
                <div class="layui-input-inline">
                    <button type="button" class="layui-btn layui-btn-primary layui-btn-xs quick_radio" client_ratio="70" salesman_radio="30">三七</button>
                    <button type="button" class="layui-btn layui-btn-primary layui-btn-xs quick_radio" client_ratio="60" salesman_radio="40">四六</button>
                    <button type="button" class="layui-btn layui-btn-primary layui-btn-xs quick_radio" client_ratio="50" salesman_radio="50">五五</button>
                </div>
                {/if}
            </div>
            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
                <legend>活动收益</legend>
            </fieldset>
            <div class="layui-form-item">
                <!--<label for="total_income" class="layui-form-label" >-->
                <!--    后台收益-->
                <!--</label>-->
                <!--<div class="layui-input-inline">-->
                <!--    <input type="text" value="" placeholder="单位：元" name="total_income" id="total_income" lay-verify="required" readonly autocomplete="off" class="layui-input">-->
                <!--</div>-->

                <label for="reduce_income" class="layui-form-label ri_div_label" >
                    *　*　*
                </label>
                <div class="layui-input-inline ri_div" >
                    <input type="number" value="" placeholder="0" name="reduce_income" id="reduce_income" autocomplete="off" class="layui-input">
                </div>
                <label for="refund_income" class="layui-form-label">
                    投错票金额
                </label>
                <div class="layui-input-inline">
                    <input type="number" value="" placeholder="0" name="refund_income" id="refund_income" autocomplete="off" class="layui-input">
                </div>
                <div class="fee_1 {$data.live_fee?'show':''}" >
                    <label for="live_fee" class="layui-form-label">
                        直播费
                    </label>
                    <div class="layui-input-inline">
                        <input type="number" value="" placeholder="0" name="live_fee" id="live_fee" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="fee_2 {$data.plive_fee?'show':''}">
                    <label for="plive_fee" class="layui-form-label">
                        照片直播
                    </label>
                    <div class="layui-input-inline">
                        <input type="number" value="" placeholder="0" name="plive_fee" id="plive_fee" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="fee_3 {$data.gift_fee?'show':''}">
                    <label for="gift_fee" class="layui-form-label">
                        礼品费
                    </label>
                    <div class="layui-input-inline">
                        <input type="number" value="" placeholder="0" name="gift_fee" id="gift_fee" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="fee_4 {$data.travel_fee?'show':''}">
                    <label for="travel_fee" class="layui-form-label">
                        差旅费
                    </label>
                    <div class="layui-input-inline">
                        <input type="number" value="" placeholder="0" name="travel_fee" id="travel_fee" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="fee_5 {$data.other_fee?'show':''}">
                    <label for="other_fee" class="layui-form-label">
                        其它费用
                    </label>
                    <div class="layui-input-inline">
                        <input type="number" value="" placeholder="0" name="other_fee" id="other_fee" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <label for="real_income" class="layui-form-label" style="background: #fffb76;">
                    实际收益
                </label>
                <div class="layui-input-inline">
                    <input type="text" value="" placeholder="单位：元" name="real_income" id="real_income" lay-verify="required" autocomplete="off" class="layui-input" readonly>
                </div>
            </div>

            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
                <legend>客户收益</legend>
            </fieldset>
            <div class="layui-form-item">
                <label for="client_income" class="layui-form-label">
                    客户收益
                </label>
                <div class="layui-input-inline">
                  <input type="text" value="" readonly placeholder="单位：元" name="client_income" id="client_income" autocomplete="off" class="layui-input">
                </div>
                <label for="client_sxfee_radio" class="layui-form-label">
                    手续费点位
                </label>
                <div class="layui-input-inline">
                    <input type="number" value="0" placeholder="单位：%" name="client_sxfee_radio" id="client_sxfee_radio" autocomplete="off" class="layui-input">
                </div>
                <label for="client_charges" class="layui-form-label">
                    手续费
                </label>
                <div class="layui-input-inline">
                    <input type="text" value="" placeholder="单位：元" name="client_charges" id="client_charges" readonly autocomplete="off" class="layui-input">
                </div>
                <div class="client_fee_1  {$data.client_live_fee?'show':''}">
                    <label for="client_live_fee" class="layui-form-label">
                        直播费
                    </label>
                    <div class="layui-input-inline">
                        <input type="number" value="" placeholder="0" name="client_live_fee" id="client_live_fee" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="client_fee_2  {$data.client_plive_fee?'show':''}">
                    <label for="client_plive_fee" class="layui-form-label">
                        照片直播
                    </label>
                    <div class="layui-input-inline">
                        <input type="number" value="" placeholder="0" name="client_plive_fee" id="client_plive_fee" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="client_fee_3  {$data.client_gift_fee?'show':''}">
                    <label for="client_gift_fee" class="layui-form-label">
                        礼品费
                    </label>
                    <div class="layui-input-inline">
                        <input type="number" value="" placeholder="0" name="client_gift_fee" id="client_gift_fee" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="client_fee_4  {$data.client_travel_fee?'show':''}">
                    <label for="client_travel_fee" class="layui-form-label">
                        差旅费
                    </label>
                    <div class="layui-input-inline">
                        <input type="number" value="" placeholder="0" name="client_travel_fee" id="client_travel_fee" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="client_fee_5  {$data.client_other_fee?'show':''}">
                    <label for="client_other_fee" class="layui-form-label">
                        其它费用
                    </label>
                    <div class="layui-input-inline">
                        <input type="number" value="" placeholder="0" name="client_other_fee" id="client_other_fee" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="client_fee_6  {$data.client_other_income?'show':''}">
                    <label for="client_other_income" class="layui-form-label">
                        其它收益
                    </label>
                    <div class="layui-input-inline">
                        <input type="number" value="" placeholder="0" name="client_other_income" id="client_other_income" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <label for="client_final_income" class="layui-form-label" style="background: #fffb76;">
                    实际收益
                </label>
                <div class="layui-input-inline">
                    <input type="number" readonly value="" placeholder="单位：元" name="client_final_income" id="client_final_income" autocomplete="off" class="layui-input">
                </div>
                
            </div>
            
            <div class="layui-form-item layui-form-text" style="width:310px;  clear:none; margin-right:10px">
                <label class="layui-form-label">营销的费用说明</label>
                <div class="layui-input-block">
                    <textarea placeholder="" name="fee_remark" class="layui-textarea" style="resize:none;width:100%">{$data.fee_remark}</textarea>
                </div>
            </div>

            
            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
                <legend>结算信息</legend>
            </fieldset>
            <div class="layui-form-item">
                <label for="client_ratio" class="layui-form-label">
                    转账类型
                </label>
                <div class="layui-input-inline">
                    <select name="settle_type" >
                        <option value="1" {$data.settle_type == 1?'selected':''} >公转</option>
                        <option value="2" {$data.settle_type == 2?'selected':''} >私转</option>
                    </select>
                </div>
                <label for="salesman_radio" class="layui-form-label">
                    转账日期
                </label>
                <div class="layui-input-inline">
                    <input type="text" value="" placeholder="" name="settle_date" id="settle_date" lay-verify="required" autocomplete="off" class="layui-input">
                </div>
                <label for="salesman_radio" class="layui-form-label">
                    转账截图
                </label>
                <div class="layui-input-inline">
                    <button type="button" style="width: 140px;" class="layui-btn layui-btn-sm layui-btn-normal" id="uploads">上传图片</button>
                    <img id="img" src="" width="250px" style="margin-top: 5px;display: block;">
                    <input type="hidden" name="settle_image" id="settle_image" lay-verify="required" required  value="" />
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-form-item layui-form-text" style="width:310px; float:left; clear:none">
                    <label class="layui-form-label">结算备注</label>
                    <div class="layui-input-block">
                        <textarea placeholder="请输入内容" class="layui-textarea" name="check_remark" style="resize:none;width:100%">{$data.check_remark}</textarea>
                    </div>
                </div>
            </div>
            
            
            
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button type="button" class="layui-btn layui-btn-primary " lay-filter="check" data-status="2">结算</button>
                </div>
            </div>
            </div>
            <div id="page-2">



            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button type="button" class="layui-btn layui-btn-primary next-btn">下一步</button>
                    
                    <button type="button" class="layui-btn layui-btn-primary prev-btn">上一步</button>
                    {if condition="$data.status == 0"}
                    <button type="submit" class="layui-btn" lay-submit="" lay-filter="add">申报</button>
                    <button type="submit" class="layui-btn" lay-submit="" lay-filter="save">暂存</button>
                    {elseif condition="$data.status == 2 && session('uid','','admin') == 1"}
                    <button type="submit" class="layui-btn" lay-submit="" lay-filter="check" data-status="2">保存</button>
                    {elseif condition="$data.status == 1 && session('uid','','admin') == 1"}
                    <button type="submit" class="layui-btn" lay-submit="" lay-filter="check" data-status="2">审核通过</button>
                    <button type="submit" class="layui-btn layui-btn-danger" lay-submit="" lay-filter="check" data-status="0">审核不通过</button>
                    {/if}
                </div>
            </div>
            
            {if condition="$data.id"}
            <fieldset class="layui-elem-field layui-field-title" style="">
                <legend>直播和礼品费用参考</legend>
            </fieldset>
            <div class="layui-form-item">
                <table class="layui-table layui-form" style="width: 500px;float: left;margin-right:30px;cursor:pointer"  lay-size="sm" lay-even="" lay-skin="row">
                    <thead>
                        <tr>
                            <th>礼品</th>
                            <th width="60">底价</th>
                            <th width="60">数量</th>
                            <th width="60">总价</th>
                        </tr> 
                    </thead>
                    <tbody>
                    {volist name="giftFeeList" id="v"}
                    <tr  onclick="x_admin_show('查看详情','/admin.php/goods_orders/ordersview/id/{$v.order_id}','','650','600')">
                        <td>{$v.brand} {$v.goods_name}</td>
                        <td>{$v.real_price}</td>
                        <td>{$v.goods_count}</td>
                        <td>{$v.real_price * $v.goods_count}</td>
                    </tr>
                    {/volist}
                    </tbody>
                </table>
                <table class="layui-table layui-form" style="width: 500px;float: left;cursor:pointer"  lay-size="sm" lay-even="" lay-skin="row">
                    <thead>
                        <tr>
                            <th>直播类型</th>
                            <th width="60">费用</th>
                        </tr> 
                    </thead>
                    <tbody>
                    {volist name="liveFeeList" id="v"}
                    <tr onclick="x_admin_show('查看详情','/admin.php/data_table/livedetailedit/id/{$v.id}','','650','600')">
                        <td>{$v.activity_need_device}</td>
                        <td>{$v.price}</td>
                    </tr>
                    {/volist}
                    </tbody>
                </table>
            </div>
            <div class="layui-form-item">
                <fieldset class="layui-elem-field layui-field-title" style="">
                    <legend>申报表填写费用</legend>
                </fieldset>
                {if $data.live_fee || $data.plive_fee || $data.gift_fee || $data.travel_fee || $data.other_fee }
                <table class="layui-table layui-form" style="width:30%;margin-right:2%;float:left;"  lay-size="sm" lay-even="" lay-skin="row">
                    <thead>
                        <tr>
                            <th>总收益扣除项目</th>
                            <th width="60">金额</th>
                        </tr> 
                    </thead>
                    <tbody>
                    {if $data.live_fee}
                    <tr>
                        <td>直播费</td>
                        <td>{$data.live_fee}</td>
                    </tr>
                    {/if}
                    {if $data.plive_fee}
                    <tr>
                        <td>照片直播费</td>
                        <td>{$data.plive_fee}</td>
                    </tr>
                    {/if}
                    {if $data.gift_fee}
                    <tr>
                        <td>礼品费</td>
                        <td>{$data.gift_fee}</td>
                    </tr>
                    {/if}
                    {if $data.travel_fee}
                    <tr>
                        <td>差旅费</td>
                        <td>{$data.travel_fee}</td>
                    </tr>
                    {/if}
                    {if $data.other_fee}
                    <tr>
                        <td>其它费用</td>
                        <td>{$data.other_fee}</td>
                    </tr>
                    {/if}
                    </tbody>
                </table>
                {/if}
                
                {if $data.client_live_fee || $data.client_plive_fee || $data.client_gift_fee || $data.client_travel_fee || $data.client_other_fee }
                <table class="layui-table layui-form" style="width:30%;margin-right:2%;float:left;"  lay-size="sm" lay-even="" lay-skin="row">
                    <thead>
                        <tr>
                            <th>客户收益扣除项目</th>
                            <th width="60">金额</th>
                        </tr> 
                    </thead>
                    <tbody>
                    {if $data.client_live_fee}
                    <tr>
                        <td>直播费</td>
                        <td>{$data.client_live_fee}</td>
                    </tr>
                    {/if}
                    {if $data.client_plive_fee}
                    <tr>
                        <td>照片直播费</td>
                        <td>{$data.client_plive_fee}</td>
                    </tr>
                    {/if}
                    {if $data.client_gift_fee}
                    <tr>
                        <td>礼品费</td>
                        <td>{$data.client_gift_fee}</td>
                    </tr>
                    {/if}
                    {if $data.client_travel_fee}
                    <tr>
                        <td>差旅费</td>
                        <td>{$data.client_travel_fee}</td>
                    </tr>
                    {/if}
                    {if $data.client_other_fee}
                    <tr>
                        <td>其它费用</td>
                        <td>{$data.client_other_fee}</td>
                    </tr>
                    {/if}
                    </tbody>
                </table>
                {/if}

            </div>
            {/if}
            </div>
        </form>
    </div>

    <script>
    layui.use(['form','layer','laydate','dropdown','layarea','upload'], function(){
      $ = layui.jquery;
      var form = layui.form
      ,layer = layui.layer
      ,laydate = layui.laydate
      ,dropdown = layui.dropdown
      ,upload = layui.upload
      ,layarea = layui.layarea;
      
        laydate.render({
            elem: '#settle_date'
        });

        var uploadInst = upload.render({
              elem: '#uploads'
              , url: '/admin.php/data_table/upload'
              , before: function (obj) {
                //预读本地文件示例，不支持ie8
                obj.preview(function (index, file, result){
                    //如果有图片再点击上传就撤销原来的图片
                    var img=$("#img").attr("src");
                    var imgurl=$("#settle_image").val();
                    $('#img').attr('src', result); //图片链接(base64)
                });
              }
              , done: function (res) {
                  //如果上传失败
                  if (res.code == 0) {
                      return layer.msg(res.err);
                  }
                  //上传成功
                  if(res.code == 1) {
                      $('#img').attr('src','/uploads/jiesuan/'+res.savename);
                      $('#settle_image').attr('value','/uploads/jiesuan/'+res.savename);
                  }
              }
        });
        
        {if condition="$data"}
        {foreach name="data" id="value" key="key"}
        $('#{$key}').val('{$value}');
        {/foreach}
        {/if}
        
        var rishow = 0;
        /*$('.ri_div').click(function(){
            if(rishow == 0){
                $('.ri_div').show(300);
                $('.ri_div_label').width(120);
                $('#reduce_income').focus();
                rishow = 1;
            }else{
                $('.ri_div').hide(0);
                $('.ri_div_label').width(0);
                rishow = 0;
            }
        })
        $('#reduce_income').blur(function(){
            $('.ri_div').hide(300);
            $('.ri_div_label').width(0);
            rishow = 0;
        })*/
        $('.quick_radio').click(function(){
            $('#client_ratio').val($(this).attr('client_ratio'));
            $('#salesman_radio').val($(this).attr('salesman_radio'));
            $('.quick_radio').hide();
            updateData();
        })

        form.on('submit(check)', function(data){
            
            $.ajax({
                type:'POST',
                dataType:'json',
                data:{data:data.field,settle_status:1},
                success:function(obj){
                    layer.alert(obj.msg, {icon: obj.icon},function(){
                        var index = parent.layer.getFrameIndex(window.name);
                        parent.layer.close(index);
                        x_admin_father_reload();
                    });    
                }
            });
            return false;
        });
        
        var page = 1;
        $('.next-btn').click(function(){
            $('#page-'+page).hide();
            page++;
            $('#page-'+page).show();
        })
        $('.prev-btn').click(function(){
            $('#page-'+page).hide();
            page--;
            $('#page-'+page).show();
        })

        $('#client_ratio').blur(function(){
            $('#salesman_radio').val(100-$(this).val());
        })
        
        $('#live_id').blur(function(){

        })
        
        $('input').blur(function(){
            if($(this).attr('id') == 'live_id'){
                $.get('/admin.php/Performance/getTotalIncome?live_id='+$(this).val(),function(data){
                    if(data.code == 1)
                    {
                        $.each(data.data, function(index, value) {
                            if(value!='') {
                                $('#'+index).val(value);
                            }
                        });
                    }
                },'json')
            }else{
                updateData();
            }

        })
          
        function updateData()
        {
            $.post('/admin.php/Performance/compute?type=1',$('form').serializeArray(),function(data){
                //data = JSON.parse(data);
                if(data.code == 1){
                    $.each(data.data, function(index, value) {
                        if( index != 'salesman_radio') {
                            $('#'+index).val(value);
                        }
                    });
                    //value != '' &&
                }else{
                    layer.alert(data.msg);
                }
            },'json')
        }
        
    });
    </script>
  </body>

</html>